<%@ page pageEncoding="UTF-8"%>

<%@ taglib prefix="isperp" uri="/WEB-INF/tlds/isperp.tld"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<jsp:include page="../common/top.jsp"></jsp:include>
<script type="text/javascript">
	var knowledgeCategoryTree_Onclick = function(event, treeId, treeNode) {

		var keyword = $("#knowledgeSearchIframe")[0].contentWindow.getKeyword();

		$("#knowledgeSearchIframe").prop("src", "customer/help/knowledge/searchResult?categoryId=" + treeNode.id + "&keyword=" + keyword);

	};

	function iFrameHeight() {
		var ifm = document.getElementById("knowledgeSearchIframe");
		var subWeb = document.frames ? document.frames["knowledgeSearchIframe"].document : ifm.contentDocument;
		if (ifm != null && subWeb != null) {
			$("#knowledgeSearchIframe").height(subWeb.body.scrollHeight + 10);
		}

	}
</script>
<div class="frame-main" style="height: 100%;position: relative;">

	<div id="dvFrameMainNav" class="fl N_qus"
		style="height: 100%;width:200px">
		<isperp:tree id="knowledgeCategoryTree" title="知识分类">
			<isperp:async enable="true" url="customer/help/knowledge/getTree">
			</isperp:async>
			<isperp:callback onClick="knowledgeCategoryTree_Onclick">
			</isperp:callback>
		</isperp:tree>
	</div>
	<div id="mainContent" class="fr " role="main" style="width:770px">
		<div class="box n-box fl">
			<iframe id="knowledgeSearchIframe" frameborder="no" border="0"
				marginwidth="0" marginheight="0"
				src="customer/help/knowledge/searchResult" onload="iFrameHeight()"
				style="width:510px;height:500px;border:none;"> </iframe>
		</div>
		<div class="box n-box fr" style="clear:none;width:250px;">
			<div class="box ">
				<div class="header">
					<h2>热门知识Top10</h2>
				</div>
				<ul class="lists">
					<c:forEach items="${warmTop10Entities}" var="warmEntiry">
						<li class="nui-txt-link"><a
							href="customer/help/knowledge/knowledgeInfo?id=${warmEntiry.id}"
							target="_blank"> ${warmEntiry.title}</a>
						</li>
					</c:forEach>
				</ul>
			</div>
			<div class="box n-box" style="margin-top:5px">

				<div class="header">
					<h2>最新知识Top10</h2>
				</div>
				<ul class="lists">
					<c:forEach items="${newTop10Entities}" var="newEntity">
						<li class="nui-txt-link"><a
							href="customer/help/knowledge/knowledgeInfo?id=${newEntity.id}"
							target="_blank"> ${newEntity.title}</a></li>
					</c:forEach>
				</ul>
			</div>
		</div>
	</div>
</div>

<jsp:include page="../common/bottom.jsp"></jsp:include>